import request from '@/utils/request'
import store from '@/store'

export function queryRule (params) {
  return request({
    url: '/express/rule',
    method: 'get',
    params: Object.assign(params, { 'createUserId': store.getters.userInfo.id })
  })
}

export function queryTmp (params) {
  return request({
    url: '/express/tmp',
    method: 'get',
    params: Object.assign(params, { 'createUserId': store.getters.userInfo.id })
  })
}

export function deleteTmp (params) {
  return request({
    url: '/express/tmp',
    method: 'delete',
    data: params
  })
}

export function addTmp (params) {
  return request({
    url: '/express/tmp',
    method: 'post',
    data: Object.assign(params, { 'createUserId': store.getters.userInfo.id })
  })
}

export function mergeRule (params) {
  return request({
    url: '/express/rule',
    method: 'put',
    data: Object.assign(params, { 'createUserId': store.getters.userInfo.id })
  })
}
